<!--
- @founder   IT柏拉图, https: //weibo.com/itprato
- @author    DedeCMS团队
- @copyright Copyright (c) 2007 - 2021, 上海卓卓网络科技有限公司 (DesDev, Inc.)
--->

<html>
<head>
<meta charset="{dede:global.cfg_soft_lang/}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>修改文件属性</title>
<meta name="copyright" content="2007-2021 DedeCMS, 上海卓卓网络科技有限公司 (DesDev, Inc.)" />
<link rel="icon" href="/favicon.ico" />
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/pkg/uikit/css/uikit.min.css" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/css/manage.dede.css">
</head>
<body>
<!-- 列表头部 -->
<div id="Table_Header_202X2W2X1X292F" class="uk-card uk-card-small uk-card-default" uk-sticky="bottom: #offset">
<div id="Header_1W2T2S2T1V252B" class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small">
<span><ul class="uk-breadcrumb"><li><span>修改文件属性</span></li></ul></span>
</div>
<!-- 搜索表单 -->
<ul class="uk-navbar-nav dede-card-navbar" uk-navbar >
<li style="margin-right: 12px;"><a href="media_main.php" class="uk-button uk-button-default uk-button-small uk-flex-inline ">附件/媒体数据管理</a></li>
</ul>
<!-- /搜索表单 -->
</div>
</div>
<!-- /列表头部 -->
<form enctype="multipart/form-data" name='form1' action="media_edit.php" method="POST" onSubmit="return CheckSubmit();">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="token" value="<?php echo make_hash();?>" />
<input type="hidden" name="aid" value="<?php echo $aid?>">
<!-- 列表主体 -->
<div class="uk-card uk-card-small uk-card-default" style="margin-bottom: 50px;">
<div class="uk-card-body uk-overflow-auto" grid>
<div class="uk-child-width-1-1 uk-padding">
<div class="uk-form-horizontal uk-margin-small">
<div class="uk-margin">
<label class="uk-form-label">媒体类型</label>
<div class="uk-form-controls uk-form-controls-text ">
<input type="radio" name="mediatype" class='uk-radio' value="1" <?php if($myrow['mediatype']==1) echo " checked"; ?>/> 图片 &nbsp;
<input type="radio" name="mediatype" class='uk-radio' value="3" <?php if($myrow['mediatype']==3) echo " checked"; ?>/> 视频/音频 &nbsp;
<input type="radio" name="mediatype" class='uk-radio' value="4" <?php if($myrow['mediatype']==4) echo " checked"; ?>/> 附件/其它 &nbsp;
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label">说明标题</label>
<div class="uk-form-controls">
<input name="title" type="text" id="title" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $myrow['title']?>"/>
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label">附加参数</label>
<div class="uk-form-controls">
宽： <input name="mediawidth" type="text" id="mediawidth" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $myrow['width']?>"/> (像素)　&nbsp;&nbsp;
高： <input name="mediaheight" type="text" id="mediaheight" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $myrow['height']?>"/> (像素) &nbsp;&nbsp;
播放时间： <input name="playtime" type="text" id="mediawidth3" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $myrow['playtime']?>"/> (分钟)
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label">原文件</label>
<div class="uk-form-controls">
<input name="title" type="text" id="title" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $myrow['url']?>"/> <a href='<?php echo $myrow['url']?>' target='_blank'>[查看]</a>
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label">预览</label>
<div class="uk-form-controls">
<?php
if($myrow['mediatype']==1)
{
$fullfilename = $cfg_basedir.$myrow['url'];
if(file_exists($fullfilename)){
$info = "";
$sizes = getimagesize($fullfilename,$info);
if(is_array($sizes)){
if($sizes[0]>200) $w=200;
else $w = $sizes[0];
?>
<a href='<?php echo $myrow['url']?>' target='_blank'><img src='<?php echo $myrow['url']."?q=".time()?>' width='<?php echo $w?>' border='0' id='picview'></a>
<?php } } } ?>
</div>
</div>
<div class="uk-margin">
<label class="uk-form-label">修改文件</label>
<div class="uk-form-controls">
<div class="uk-inline" uk-form-custom="target: true">
<span class="uk-form-icon" uk-icon="icon: file"></span>
<input name="upfile" type="file">
<input class="uk-input uk-form-small uk-form-width-large" type="text" placeholder="点击选择文件" >
</div>
</div>
</div>
</div>
</div>
<div class="uk-card-footer " >
<div class="uk-padding-small" >
<button type="submit" class="uk-button uk-button-small uk-button-primary">提交</button>
</div>
</div>
</div>
<!-- /列表主体 -->
</form>
<!-- 列表底部 -->
<div class="bar-bottom uk-flex uk-light uk-flex-right">
<div class="uk-button-group" style="margin-left: 50px;">
</div>
<div class="e1e02">Copyright &copy; 2007-2021 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>, 上海卓卓网络科技有限公司 (DesDev, Inc.)</div>
</div>
<!-- 列表底部 -->
<!-- JS FILES -->
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit-icons.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/jquery/jquery.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/js/dede.manage.min.js"></script>
<script language='javascript'>
function CheckSubmit()
{
if(document.form1.title.value==""){
alert("请设定媒体标题！");
document.form1.title.focus();
return false;
}
}
</script>
<!-- / JS FILES -->
</body>
</html>
